<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexModuleLinkCompleteInTimelogTable extends AbstractMigration
{
    public function up()
    {
        $this->table('timelog')
            ->addIndex(['module_id', 'link_id', 'complete'], ['type' => 'normal', 'name' => 'idx_module_link_complete'])
            ->save();
    }

    public function down()
    {
        $this->table('timelog')
            ->removeIndexByName('idx_module_link_complete')
            ->save();
    }
}
